-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
otcore: add debug logging capability for ostree-prepare-root #3255
otcore: add debug logging capability for ostree-prepare-root #3255
Conversation
adc294b
to
05a24c2
Compare
This commit introduces a new function, proc_cmdline_has_key, to check for specific keys in the kernel command line. Additionally, it adds a debug logging mechanism in ostree-prepare-root.c, which is controlled by the presence of the "ostree-prepare-root.debug" key in the kernel command line. These changes provide enhanced visibility into the mounting process, aiding in troubleshooting. Signed-off-by: Eric Curtin <[email protected]>
05a24c2
to
0c27df0
Compare
Hmm, this feels pretty ad-hoc. I think it'd be nicer to enable this via environment variables...if systemd had something like |
Can you speak a little bit more to what you were troubleshooting? It may be for example that we could just log at least a few of these key mount invocations by default to stdout (which goes to the journal); then there'd be no need for an opt-in debug invocation. |
We could do both maybe? I'll describe in more details tomorrow, I need to head offline it's late. I was assigned to a bug that wasn't a bug today, but I would love to tell bug reporters when they see some file mounting errors in the kernel logs, just to re-run again with ostree-prepare-root.debug karg, just to remind myself what the flow is and to see the userspace logging interleaved with the kernel logging... |
Our build can't find composefs for some reason for cs9:
|
The bug logged was around kernel error messages being logged with overlayfs/composefs (it doesn't exist in the latest upstream of composefs and the kernel, so it makes sense to ignore the error logs until the changes trickle down)... But... The mount call was returning success, the error logs were coming from the kernel logs... But then the question is which overlay /etc or /usr and what were the options passed? Sure one can read the code, but it's also nice to tell the person re-run with "ostree-prepare-root.debug". ostree-prepare-root is a frequent component we see bug reports on, in some cases people can readily reproduce, would be nice to get the complete sequence of mounts interleaved with kernel logs. Normally we can do this with strace etc. but when it's an initramfs component it's hard to use tracing tools. |
Yeah, it's not part of appstream or crb so...yes, it's pretty maddening, but it is intentional at the current time. In c9s one can pull from the public-but-not-mirrored buildroot repos, or rebuild things from source. |
Yes, there are a few copies of bugs related to this (e.g. https://gitlab.com/fedora/bootc/base-images/-/issues/6 also) - I think containers/composefs@f884f57 may fix this. |
Right, I get the use case. But sorry, I think this patch won't help, because the relevant mount here is happening in libcomposefs as part of So my inclination here is to close this. |
This commit introduces a new function, proc_cmdline_has_key, to check for specific keys in the kernel command line. Additionally, it adds a debug logging mechanism in ostree-prepare-root.c, which is controlled by the presence of the "ostree-prepare-root.debug" key in the kernel command line.
These changes provide enhanced visibility into the mounting process, aiding in troubleshooting.